<?php
namespace Admin\Model;
use Think\Model;
class ConfModel extends Model {

	protected $_validate = array(
		array('cf_name','require','配置名称不能为空！',1,regex,3), 
		array('cf_ename','require','配置英文名称不能为空！',1,regex,3),
		array('cf_name','','配置名称不能重复！',1,unique,3),
		array('cf_ename','','配置英文名称不能重复！',1,unique,3),
	);
    
	public function xiugai($ret){
		foreach ($ret as $k => $v) {
			$this->execute("update ar_conf set cf_value='$v' where cf_ename='$k'");
		}
	}


}